<?php
if(isset($_COOKIE['sesion_administrativo']) && isset($_COOKIE['permisos_sesion'])){
	if($_COOKIE['permisos_sesion'] == 1){
		$rut=$_GET['rutid'];
		
		require_once("../Connections/Conexion.php");
		mysql_select_db($database_Conexion, $Conexion);
			
		$query = "DELETE FROM examen_de_grado WHERE RUT = $rut";
		mysql_query($query, $Conexion) or die(mysql_error());
		
		$query = "DELETE FROM examen_habilitante WHERE RUT = $rut";
		mysql_query($query, $Conexion) or die(mysql_error());
		
		$query = "DELETE FROM examen_tradicional WHERE RUT = $rut";
		mysql_query($query, $Conexion) or die(mysql_error());
		
		$query = "DELETE FROM graduacion WHERE RUT = $rut";
		mysql_query($query, $Conexion) or die(mysql_error());
		
		$query = "DELETE FROM alumno WHERE RUT = $rut";
		mysql_query($query, $Conexion) or die(mysql_error());
		
		mysql_close($Conexion);
	}
}
?>
<script>location.href='/udp/Mantenciones/Mantencion_Registros_Alumnos.php'</script>